From 455eefb6fae4eadf9d141b6d016607eadccefb61 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 25 Jan 2008 12:28:18 +0000 Subject: [PATCH] Change action=paraminfo's format to something that won't render invalid XML --- includes/api/ApiParamInfo.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiParamInfo.php b/includes/api/ApiParamInfo.php index b14fafc642..563c20f514 100644 --- a/includes/api/ApiParamInfo.php +++ b/includes/api/ApiParamInfo.php @@ -49,12 +49,15 @@ class ApiParamInfo extends ApiBase { { if(!isset($modArr[$m])) { - $r['modules'][$m] = array('missing' => ''); + $r['modules'][] = array('name' => $m, 'missing' => ''); continue; } $obj = new $modArr[$m]($this->getMain(), $m); - $r['modules'][$m] = $this->getClassInfo($obj); + $a = $this->getClassInfo($obj); + $a['name'] = $m; + $r['modules'][] = $a; } + $result->setIndexedTagName($r['modules'], 'module'); } if(is_array($params['querymodules'])) { @@ -64,12 +67,15 @@ class ApiParamInfo extends ApiBase { { if(!isset($qmodArr[$qm])) { - $r['querymodules'][$qm] = array('missing' => ''); + $r['querymodules'][] = array('name' => $qm, 'missing' => ''); continue; } $obj = new $qmodArr[$qm]($this, $qm); - $r['querymodules'][$qm] = $this->getClassInfo($obj); + $a = $this->getClassInfo($obj); + $a['name'] = $qm; + $r['querymodules'][] = $a; } + $result->setIndexedTagName($r['querymodules'], 'module'); } $result->addValue(null, $this->getModuleName(), $r); } -- 2.20.1